    <head>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.url.js" charset="utf-8"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.validate.min.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.validate.wrapper.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.ui.wxtab.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.ui.wxgrid.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/Calendar/jscal2.js" charset="utf-8"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/Calendar/lang/cn.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.ui.wxcolresizable.js"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/jquery.ui.wxtablesorter.js" charset="utf-8"></script>
        <script type="text/javascript" src="${rc.contextPath}/Scripts/webapp/01_trade/salesContract_edit.js"></script>
        <link type="text/css" rel="stylesheet" href="${rc.contextPath}/Styles/Grid.css" />
        <link type="text/css" rel="stylesheet" href="${rc.contextPath}/Styles/Forms_Edit.css" />
        <link type="text/css" rel="stylesheet" href="${rc.contextPath}/Styles/Calendar/jscal2.css" />
        <link type="text/css" rel="stylesheet" href="${rc.contextPath}/Styles/UI/TabStrip.css" />
    </head>
    <body>
        <div id="panelTop" style="position:relative; top:0px; height:28px; line-height:28px;">
            <div id="btnPanel" style="position:relative; left:8px; width:auto; top:1px; padding-top:0px;">
                <input type="button" name="_ButNew" value="增加" id="ButNew" class="actButton" onclick="thisPage.DoInsert();"/>
                <input type="button" name="_ButUpdate" value="保存" id="ButUpdate" class="actButton" onclick="thisPage.Save();" />
                <input type="button" name="_ButClose" value="返回一览画面" id="ButClose" class="actButton" style="margin-left:10px;" onclick="location.assign(parent.basePath + '/trade/salesContract/list.html?flag=1');" />
            </div>
        </div>
        <input id="HeaderId" type="hidden" value="0" />
        <!--span id="IsChecked" class="n1" style="position:absolute; top:6px; right:8px; width:auto; padding:3px 8px;">状态：已审核。</span-->
        <table id="tb-field" class="field" style="position:relative; top:3px; left:8px; text-align:left; width:100%;">
            <colgroup>
                <col style="width: 100px;" />
                <col style="width: 220px;" />
                <col style="width: 100px;" />
                <col style="width: 220px;" />
                <col style="width: 100px;" />
                <col style="width: 220px;" />
                <col style="width: 100px;" />
                <col />
            </colgroup>
            <tbody>
                <tr>
                    <th>
                        <label for="NoOfContract">合同号<em>★</em></label>
                    </th>
                    <td>
                        <input type="text" id="NoOfContract" name="_NoOfContract" tabindex="1" />
                    </td>
                    <th>
                        <label for="DateOfContract">签单日期<em>★</em></label>
                    </th>
                    <td>
                        <input type="text" id="DateOfContract" name="_DateOfContract" tabindex="2" />
                    </td>
                    <th>
                        <label for="PlaceOfSigning">签订地点</label>
                    </th>
                    <td>                       
                        <input type="text"" id="PlaceOfSigning" name="_PlaceOfSigning" tabindex="3" />
                    </td>
                    <th>
                        <label for="MoreOrLessAllowed">允许数量增减</label>
                    </th>
                    <td>
                        <input type="text"" id="MoreOrLessAllowed" name="_MoreOrLessAllowed"  tabindex="4" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <label for="TheBuyingPartyName">买方客户<em>★</em></label>
                    </th>
                    <td colspan="3">
                        <input type="hidden" id="TheBuyingPartyId" name="_TheBuyingPartyId" value="" />
                        <input type="text"" id="TheBuyingPartyName" name="_TheBuyingPartyName" readonly="readonly" tabindex="5" style="width:400px;" />
                        <span id="ChoiceTheBuyingParty" title="选择数据" style="cursor:pointer;" onclick="thisPage.DoChoiceTheBuyingParty();"><i class="fa-all fa-question-circle fa-1"></i></span>
                    </td>
                   <th>
                        <label for="TheSellingPartyName">卖方<em>★</em></label>
                    </th>
                    <td colspan="3">
                        <input type="hidden" id="TheSellingPartyId" name="_TheSellingPartyId" value="" />
                        <input type="text"" id="TheSellingPartyName" name="_TheSellingPartyName" readonly="readonly" tabindex="6" style="width:400px;"/>
                        <span id="ChoiceTheSellingParty" title="选择数据" style="cursor:pointer;" onclick="thisPage.DoChoiceTheSellingParty();"><i class="fa-all fa-question-circle fa-1"></i></span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <label for="TimeOfShipment">装运期限</label>
                    </th>
                    <td>
                        <input type="text" id="TimeOfShipment" name="_TimeOfShipment" tabindex="7" />
                    </td>
                    <th>
                        <label for="LoadingPort">装运口岸<em>★</em></label>
                    </th>
                    <td>
                        <input type="text" id="LoadingPort" name="_LoadingPort" tabindex="8" />
                    </td>
                    <th>
                        <label for="Destination">目的口岸<em>★</em></label>
                    </th>
                    <td>                       
                        <input type="text"" id="Destination" name="_Destination" tabindex="9" />
                    </td>
                    <th>
                        <label for="CargoInsurance">保险</label>
                    </th>
                    <td>
                        <input type="text"" id="CargoInsurance" name="_CargoInsurance"  tabindex="10" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <label for="ModeOfSettlementName">付款<em>★</em></label>
                    </th>
                    <td>
                        <input type="hidden" id="ModeOfSettlementId" name="_ModeOfSettlementId" value="" />
                        <input type="text"" id="ModeOfSettlementName" name="_ModeOfSettlementName" readonly="readonly" tabindex="11" />
                        <span id="ChoiceModeOfSettlement" title="选择数据" style="cursor:pointer;" onclick="thisPage.DoChoiceModeOfSettlement();"><i class="fa-all fa-question-circle fa-1"></i></span>
                    </td>
                    <th>
                        <label for="PackingBox">包装</label>
                    </th>
                    <td>
                        <input type="text" id="PackingBox" name="_PackingBox" tabindex="12" />
                    </td>
                    <th>
                        <label for="Brand">品牌名</label>
                    </th>
                    <td>                       
                        <input type="text"" id="Brand" name="_Brand" tabindex="13" />
                    </td>
                    <th>
                        <label for="Other">其他</label>
                    </th>
                    <td>
                        <input type="text"" id="Other" name="_Other"  tabindex="14" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <label for="Amount">总金额</label>
                    </th>
                    <td>
                        <input type="text" id="Amount" name="_Amount" readonly="readonly" tabindex="15" />
                    </td>
                    <th>
                        <label for="CurrencyName">货币类型<em>★</em></label>
                    </th>
                    <td>
                        <input type="hidden" id="CurrencyId" name="_CurrencyId" value="" />
                        <input type="text"" id="CurrencyName" name="_CurrencyName" readonly="readonly" tabindex="16" />
                        <span id="ChoiceCurrency" title="选择数据" style="cursor:pointer;" onclick="thisPage.DoChoiceCurrency();"><i class="fa-all fa-question-circle fa-1"></i></span>
                    </td>   
                    <th>
                        <label for="UpdatedByName">操作员</label>
                    </th>
                    <td>
                        <input type="text" id="UpdatedByName" name="_UpdatedByName" readonly="readonly" tabindex="17" value="<#if identityUser?exists>${identityUser.getEmployeeName()}</#if>"/>
                    </td>
                    <th>
                        <label for="UpdatedDate">操作日期</label>
                    </th>
                    <td>
                        <input type="text" id="UpdatedDate" name="_UpdatedDate" readonly="readonly" tabindex="18" />
                    </td>
                </tr>
            </tbody>
        </table>

        <!-- 明细部分 -->
        <div id="SlaveArea" style="position:relative; top:10px;">
            <!-- 折叠标记 -->
            <div id="hPanelSplitter" title="隐藏主表"><i class="fa-all fa-angle-double-up"></i></div>
            <ul id="tabPanelHeader" class="tabstrip" style="top:0px; width:100%">
                <li id="menu_01" class="tabInactive" style="margin-left:25px;">
                    <div>
                        <span class="tab_stretch"><span class="tabtext"><abbr class="ls_01">售货合同明细</abbr></span></span>
                    </div>
                </li>
            </ul>
            <div id="tabPanelContent" class="tab-wrapper" style="top:0px; height:auto;">
                <div id="tabWrapper01" class="tab-content" style="padding-top:5px;">
                    <div id="slaveBtnPanel" style="clear:both; position:relative; top:3px; display:block; z-index:+1;">
                        <div class="buttonWrapper" style="height:22px; line-height:22px;">                            
                            <input type="button" name="_ButInsertLines" value="增加" id="ButInsertLines" class="actButton" onclick="linesHandler.AddLines();" />
                            <input type="button" name="_ButUpdateLines" value="保存" id="ButUpdateLines" class="actButton" onclick="linesHandler.SaveLines();" />
                        </div>
                    </div>
                    <div id="SlaveDataArea_01" style="margin-top:10px;">
                        <table id="tabSlaveContent_01" class="grid01" style="width:100%;">
                            <tr>
                                <th style="padding:0px;">
                                    <table id="tabHead01" class="grid01" style="border:none; width:100%;">
                                        <colgroup>
                                            <col style="width: 36px;" />
                                            <col style="width: 110px;" />
                                            <col style="width: 110px;" />
                                            <col style="width: 130px;" />
                                            <col style="width: 100px;" />
                                            <col style="width: 80px;" />
                                            <col style="width: 110px;" />
                                            <col />
                                        </colgroup>
                                        <thead>
                                            <tr>
                                                <th style="border-bottom:none; text-align:center;">删除</th>
                                                <th class="editable-column" style="border-bottom:none;">唛头号</th>
                                                <th class="editable-column" style="border-bottom:none;">款号</th>
                                                <th  style="border-bottom:none;">产品名称</th>
                                                <th class="editable-column" style="border-bottom:none;">数量</th>
                                                <th class="editable-column" style="border-bottom:none;">单价</th>
                                                <th style="border-bottom:none;">总值</th>
                                                <th class="editable-column" style="border-bottom:none;">成分</th>
                                            </tr>
                                        </thead>
                                    </table>
                                </th>
                            </tr>
                            <tr>
                                <td style="padding:0px; vertical-align:top;">
                                    <div id="divContent" class="gridDataWrapper" style="border:none; width:100%; overflow-y:scroll; overflow:-moz-scrollbars-vertical;">
                                        <table id="tabData01" class="grid01" style="margin-top:-1px;width:100%;   ">
                                            <colgroup>
                                                <col style="width: 36px;" />
                                                <col style="width: 110px;" />
                                                <col style="width: 110px;" />
                                                <col style="width: 130px;" />
                                                <col style="width: 100px;" />
                                                <col style="width: 80px;" />
                                                <col style="width: 110px;" />
                                                <col />
                                            </colgroup>
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </body>